12. Correlation & Covariance in Trading Data
PRDTM2-785 AI Trading C2 L4 Vid6 Correlation And Covarience In Trading Data 2
Understanding Data Relationships with Correlation and Covariance
Correlation and Covariance:
- Covariance: Measures how two variables move together.
- Positive Covariance: Variables increase or decrease together.
- Negative Covariance: As one variable increases, the other decreases.
- Correlation: Indicates the strength and direction of the relationship between two variables on a standardized scale from -1 to 1.
- Positive Correlation: Perfect positive relationship is 1.
- Negative Correlation: Perfect negative relationship is -1.
- Zero Correlation: No relationship.
Applications in Trading:
- Identify asset relationships for portfolio diversification.
- High positive correlation: Assets move in the same direction.
- Low or negative correlation: Helps in reducing portfolio risk and improving diversification.
Feature Selection in Model Building:
- Correlation analysis: Crucial for choosing model features.
- Highly Correlated Variables: May add noise and be redundant in model predictions.
- Pair Plots: Useful visualization tool for examining variable interactions.
- Example: Iris dataset visualizes variable connections like petal width and length, helping improve model accuracy.
Effective use of correlation and covariance helps optimize portfolios and enhance model predictive power.
SOLUTION:
- Correlation is a standardized measure that allows comparison across different datasets, ranging from -1 to 1.
- Covariance indicates how two variables move together, with positive values showing a direct relationship.
- In machine learning, removing highly correlated variables can help improve the model's predictive power.